<div class="title">Tra cứu danh sách cá nhân</div>
<?php echo $this->Form->create('Tracuu', array('inputDefaults' => array('error' => false),'id'=>'XuLy')); ?>
<div id="buttons">
	<span style="display: inline-block; width: 50px;">TTHC</span>
	<span><?php echo
		$this->Form->input('tthc_id',array(
                              'type' => 'select',
                              'options' => $tthcs,
                              'selected' => $selectedTthc,
                              'div' => false,
                              'label' => false
                          ));
		?>
	</span><button class="button blue" id="xem">Xem</button>
</div>
<?php echo $this->Form->end();?>
<div id="formBaoCao">
	<div id="generalInfo">
	<table width="100%" cellspacing="0">
		<tr>
			<td>Chọn</td>
			<td>Số</td>
			<td>Ngày</td>
			<td>Họ tên</td>
			<td>Giới tính</td>
			<td>Ngày sinh</td>
			<td>Quốc tịch</td>
			<td>CMND</td>
		</tr>
		<?php foreach ($ketquas as $key => $ketqua):?>
		<tr>
			<td align="center"><?php echo $this->Form->input(' ',array('name'=> 'selections','type' => 'checkbox','value' => $ketqua['Ketquahanhchinh']['id']));?></td>
			<td align="center"><?php echo $key + 1;?></td>
			<td align="center"><?php echo $this->Time->format('d/m/Y', $ketqua['Ketquahanhchinh']['ngay_co_hieu_luc']);?></td>
			<td align="center"><?php echo $ketqua['Ketquahanhchinh']['ho_ten'];?></td>
			<td align="center"><?php echo $ketqua['Ketquahanhchinh']['gioi_tinh'];?></td>
			<td align="center"><?php echo $this->Time->format('d/m/Y', $ketqua['Ketquahanhchinh']['ngay_sinh']);?></td>
			<td align="center"><?php echo $ketqua['Ketquahanhchinh']['quoc_tich'];?></td>
			<td align="center"><?php echo $ketqua['Ketquahanhchinh']['cmnd'];?></td>
		</tr>
		<?php endforeach; ?>
		<?php if (empty($ketquas)):?>
		<tr>
			<td colspan="10" align="center">Không có dữ liệu</td>
		</tr>
		<?php endif; ?>
	</table>
	</div>
</div>